package com.yunchang.springboot.mapper.mwsfinance;

import com.yunchang.springboot.models.mwsfinance.FAdjustmentInventoryMonthly;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FAdjustmentInventoryMonthlyMapper {
    int deleteByPrimaryKey(Long id);

    int insert(FAdjustmentInventoryMonthly record);

    int insertSelective(FAdjustmentInventoryMonthly record);

    FAdjustmentInventoryMonthly selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(FAdjustmentInventoryMonthly record);

    int updateByPrimaryKey(FAdjustmentInventoryMonthly record);

    /**
     * 根据时间获取对应时间段内的数据
     * @param time
     * @return
     */
    List<FAdjustmentInventoryMonthly> selectByCreateTime(String time);

    /**
     * 根据日期和是否生成生成出入库明细数据获取对应的数据
     * @param date
     * @param isInventoryDetails
     * @return
     */
    List<FAdjustmentInventoryMonthly> selectByIsInventoryDetailsAndDate(@Param("date") String date, @Param("isInventoryDetails") Integer isInventoryDetails);

    /**
     * 根据fAdjustmentInventoryMonthlyList对象集合更新是否生成财务数据的状态
     * @param fAdjustmentInventoryMonthlyList
     * @return
     */
    int updateIsInventoryDetailsByFAdjustmentInventoryMonthlyList(@Param("fAdjustmentInventoryMonthlyList") List<FAdjustmentInventoryMonthly> fAdjustmentInventoryMonthlyList);
}